Developer Documentation
PATHJava Developer Documentation > Mac OS Runtime for Java > JManager > Programming With JManager


The JMAWTContext Interface

The JMAWTContext interface contains methods related to AWT contexts, including those to create frames and dispatch menu events to frames.

package com.apple.mrj.JManager;

public interface JMAWTContext {

    /* @Return the "C" version of the JMAWTContextRef */
    public int getContextRef();

    /* @Return the client specified data associated with this context */
    public int getClientData() throws JManagerException;

    /* Set the client specified data associated with this context */
    /* @param data the new data to set. */
    public void setClientData(int data) throws JManagerException;

    /* Return the number of frames created for this context */
    public int countAWTContextFrames() throws JManagerException;

    /* Return a JMFrame for the specified frame */
    /* @param frameIndex the 0 based index of the requested frame */
    public JMFrame getContextFrame(int frameIndex)
        throws JManagerException;
    /* Dispatch a menu selected event to the owning Frame */
    /* @param hMenu a MacOS MenuHandle */
    /* @param menuItem the one based menu item index */
    public void menuSelected(com.apple.MacOS.MenuHandle hMenu,
        short menuItem) throws JManagerException;

    /* Dispatch a menu selected event to the owning Frame */
    /* @param hMenu a MacOS MenuHandle */
    /* @param menuItem the one based menu item index */
    /* @param modifiers modifiers from the event record */
    public void
        menuSelected(com.apple.mrj.macos.toolbox.MenuHandle hMenu,
        short menuItem, short modifiers) throws JManagerException;
}

© 1998 Apple Computer, Inc. — (Last Updated 3 Dec 98)